home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2510.ZIP
/
TRSOURCE.EXE
/
FILESIZE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
764b
|
40 lines
/*********
*
* FILESIZE.C
*
* by Ralph Davis
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* SYNTAX: FILESIZE( <expC> )
*
* PARAMETERS: <expC> = filespec, optionally including
* drive, path, filename, and extension.
*
* RETURNS: Size of file in bytes.
*
*********/
#include "trlib.h"
TRTYPE filesize()
{
char *filename = _parc(1);
if (PCOUNT == 1 && ISCHAR(1))
{
/* No wildcards in filename */
if ((_tr_stpchr( filename, (char) '*') == 0L)
&& (_tr_stpchr( filename, (char ) '?') == 0L))
_retnl( _tr_fs( filename ) );
else
_retnl(ERRORNEGL);
}
else
_retnl(ERRORNEGL);
return;
}